body {
    margin: 0;
    padding: 0;
    background-color: #145465;
}

@font-face {
    font-family: 'Dancing';
    src: url('./fonts/DancingScript/DancingScript-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Merienda';
    src: url('./fonts/Merienda/Merienda-Light.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('./fonts/Lora/Lora-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

.book-title {
    position: absolute;
    font-family: 'Lora', sans-serif;

    color: transparent;
    background: url('./img/texture.webp') center/cover no-repeat;
    -webkit-background-clip: text;
    background-clip: text;

    line-height: 0.9;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.book-title>h1 {
    font-size: 48px;
    -webkit-text-stroke: 1px black;
    text-stroke: 1px black;
    margin-bottom: 15px;
}

.book-title>p {
    font-size: 22px;
    -webkit-text-stroke: 0.5px black;
    text-stroke: 0.3px black;
    margin-top: 0;
    width: calc(100vw - 20px);
}

.second-title {
    color: #5e351a;
    font-family: 'Lora', sans-serif;
    line-height: 0.9;
    text-align: center; 
}

.second-title>h1 {
    font-size: 40px;
}

.second-title-container {
    width: 100%;
    height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.island {
    width: 55%;
}

.dedication {
    font-family: 'Dancing', sans-serif;
    font-size: 30px;
    color: #5e351a;
    font-weight: 100;
    text-align: center;
}

.l-supl-s, .l-supl-b {
    font-family: 'Dancing', sans-serif;
    font-size: 24px;
    color: #5e351a;
    font-weight: 100;
    text-align: center;
}

.l-supl-b {
   font-size: 30px; 
}

#book {
    position: relative;
    max-width: 1061px;
    overflow: hidden;
    margin: auto;
    margin-top: 10px;
    margin-bottom: 10px;
    z-index: 1000;
}

.btn-container {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    align-items: center;
}

.btn-close {
    position: absolute;
}

.btn-close>img {
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.btn-next, .btn-prev, .btn-voice, .btn-sounds, .btn-copy, .btn-music {
    width: 35px;
    height: 35px;
    position: absolute;
    cursor: pointer;
}

.btn-prev, .btn-voice, .btn-sounds {
    left: 10px;
}

.btn-next, .btn-close, .btn-copy {
    right: 10px;
}

.btn-voice, .btn-copy {
    margin-top: -150px;
}

.btn-sounds, .btn-close {
    margin-top: 150px;
}

.btn-music {
    top: 30px;
    right: 15px;
    z-index: 10000;
    transform: scale(1);
    animation: puls 4s infinite;
}

@keyframes puls {
     0% {
        transform: scale(0.85);
    }

    50% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.85);
    }

}

.rights {
    position: absolute;
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
    color: #b7bbbf;
    bottom: 110px;
    transform: rotateZ(-90deg);
    left: -70px;
}

.bg-pg, .img-cop {
    position: relative;
    max-width: 100%;
    height: 100%;
    background-image: url('./img/background.webp');
    background-size: cover;
    background-repeat: no-repeat;
}

/*fix display*/

.bg-pg {
    display: flex;
    flex-direction: column;
}

/*fix dispay end*/
.img-cop {
    background-image: url('./img/coperta-ext-1.webp');
}

.txt-cop-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tim-decoration {
    width: 130px;
}

.c-rights {
    position: absolute;
    font-family: 'Merienda', sans-serif;
    width: 100%;
    font-size: 12px;
    bottom: -5px;
    color: #5e351a;
    text-align: center;
}

.b-links {
    text-decoration: none;
    cursor: pointer;
     color: #5e351a;
}

.text-container {
    position: relative;
    width: 90%;
    font-family: 'Merienda', sans-serif;
    font-size: 16px;
    margin: auto;
    color: #5e351a;
    display: flex;
    /*height: calc(50% - 50px);*/
    /*fix display*/
    flex: 1;
    margin-bottom: 30px;
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #145465 transparent; /* Firefox */
    /*fix display end*/
}

.text-container>p {
    position: relative;
    /*align-content: flex-end;
    height: 100%;*/
    align-content: center;
}

.text-container::-webkit-scrollbar {
  width: 4px; /* grosimea barei */
}

.text-container::-webkit-scrollbar-track {
  background: transparent;
}

.text-container::-webkit-scrollbar-thumb {
  background-color: #145465;
  border-radius: 2px;
}

.mask-container {
    position: relative;
    width: 100%;
    /*height: 50%;*/
    /*fix display*/
    flex: 0 0 auto;
    /*fix display end*/
    max-height: 65vh;
}

.mask {
    position: relative;
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
    max-height: 100%;
}

.mask7, .mask8, .mask9, .mask10, .mask11, .mask12, .mask13, .mask14, .mask17, .mask18, .mask21, .mask22 {
   mask-size: 100% 105%;  
}

.mask {
    -webkit-mask-image: url('./masks/mask.webp');
    mask-image: url('./masks/mask.webp');
}

.image-page {
    width: 100%;
    max-width: 1000px;
}

.pg-number {
    position: absolute;
    bottom: 5px;
    width: 100%;
    font-family: 'Merienda', sans-serif;
    font-size: 10px;
    text-align: center;
    color: #5e351a;
}

.fin-txt {
    position: absolute;
    top: 15px;
}

@media (max-width: 768px) {
    #book {
        margin: 0;
    }

    .btn-container {
        position: relative;
        display: flex;
        justify-content: space-around;
        width: 100%;
        background-color: black;
    }

    .rights {
        display: none;
    }

    .btn-close {
        position: relative;
        margin: auto;
        display: flex;
    }

    .btn-close>img {
        width: 30px;
        cursor: pointer;
        padding: 10px;
        margin: auto;
    }

    .btn-next, .btn-prev, .btn-voice, .btn-sounds, .btn-copy {
    width: 30px;
    cursor: pointer;
    padding: 10px;
    position: relative;
    margin: auto;
    display: flex;
}


.btn-prev, .btn-voice, .btn-sounds {
    left: 0;
}

.btn-next, .btn-close, .btn-copy {
    right: 0;
}

.btn-voice, .btn-copy {
    margin-top: 0;
}

.btn-sounds, .btn-close {
    margin-top: 0;
}

.btn-prev {
    margin-left: 0;
}

.btn-next {
    margin-right: 0;
}

    .book-title>h1 {
        font-size: 44px;
    }

    .book-title>p {
        font-size: 19px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .second-title>h1 {
        font-size: 35px;
    }

    .mask7, .mask8, .mask9, .mask10, .mask11, .mask12, .mask13, .mask14, .mask17, .mask18, .mask21, .mask22 {
        mask-size: 100% 102%;  
    }
}

.text-container {
  font-size: clamp(16px, 1.2vw, 22px);
  
}

@media (max-width: 376px) {
  .text-container {
    font-size: 16px;
  }
}

/* Standard phones: 401px–480px */
@media (min-width: 401px) and (max-width: 480px) {
  .text-container {
    font-size: 19px;
  }
}

/* Large phones / phablets: 481px–600px */
@media (min-width: 481px) and (max-width: 600px) {
  .text-container {
    font-size: 20px;
  }
}


